/**
 * timePickerMini vuex
 */
import common from "@/plugins/common.js";
// initial state
const state = {
  times: {
    startTime: "",
    endTime: ""
  }
}
// getters
const getters = {
  getTimes: state => state.times,
}
// actions

const actions = {}

// mutations
const mutations = {
  changeStartTime(state, range) {
    state.times.startTime = common.changeDateToString(new Date(new Date(state.times.endTime).getTime() - range))
  },
  changeEndTime(state, val) {
    state.times.endTime = val
  }
}


export default {
  state,
  getters,
  actions,
  mutations
}